general method for ellipse construction